# --------------------------------------------------------
#  Copyright (C) 2004-2019 by EMGU Corporation. All rights reserved.
# --------------------------------------------------------

IF(EMGU_CV_BUILD OR EMGU_CV_EXAMPLE_BUILD)

PROJECT(Emgu.Util)

#IF(NOT ANDROID)
#FILE(GLOB_RECURSE SRC_EMGU_UTIL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
#LIST(APPEND SRC_EMGU_UTIL ${CMAKE_CURRENT_SOURCE_DIR}/../CommonAssemblyInfo.cs)
#GENERATE_DOCUMENT(${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME})
#SIGN_ASSEMBLY(${CMAKE_CURRENT_SOURCE_DIR}/../Emgu.CV.snk)
#SET_CS_TARGET_FRAMEWORK(${CSC_TARGET_FRAMEWORK})
#COMPILE_CS(${PROJECT_NAME} "library" "${SRC_EMGU_UTIL}" ALL)
#INSTALL(
#  FILES 
#  ${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME}.xml
#  ${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME}.dll 
#  DESTINATION ${CPACK_PACKAGE_CLI_FOLDER}
#  COMPONENT emgucv_binary)
#if(ENABLE_SOLUTION_FOLDERS)
#    set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "emgu")
#endif()
#ENDIF()
  
IF(WIN32 OR APPLE OR ANDROID)
#IF(NETFX_CORE OR ANDROID)
INSTALL(
  DIRECTORY
  ${CMAKE_CURRENT_SOURCE_DIR}
  DESTINATION .
    COMPONENT emgucv_source
  FILES_MATCHING 
	PATTERN "*.shproj"
	PATTERN "*.projitems"
	PATTERN "*.cs"
    PATTERN "*.resx"
    PATTERN ".svn" EXCLUDE
    PATTERN "obj" EXCLUDE
    PATTERN "CMakeFiles" EXCLUDE
    PATTERN "${PROJECT_NAME}.dir" EXCLUDE
    )
#ELSE()
#INSTALL(
#  DIRECTORY
#  ${CMAKE_CURRENT_SOURCE_DIR}
#  DESTINATION .
#    COMPONENT emgucv_source
#  FILES_MATCHING 
#    PATTERN "${PROJECT_NAME}.csproj"
#    PATTERN "*.cs"
#    PATTERN "*.resx"
#    PATTERN ".svn" EXCLUDE
#    PATTERN "obj" EXCLUDE
#    PATTERN "CMakeFiles" EXCLUDE
#    PATTERN "${PROJECT_NAME}.dir" EXCLUDE
#    PATTERN "*Android*" EXCLUDE)
#ENDIF()

ENDIF()  

ENDIF()
